package com.tzy.user.service;
import com.tzy.common.entity.MyAssets;
import com.tzy.common.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
/**
 *  远程调用其他模块的接口
 * @author 谭同学
 * @since 2022-02-28
 */
@Component//标识为组件
@FeignClient(name = "assets")//feign客户端通过动态代理//出错的概率小一些
public interface AssetsServiceRPC {
    //映射地址, 通过反射获取 ServiceId,url ,Class
    @PostMapping("/assets/add")
    boolean save(@RequestBody MyAssets myAssets);
//    @PutMapping("/user/add")
//    int insert(@RequestBody User user);
}
